//
//  LSZSignRecordManager.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/6/8.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LSZSignRecordManager.h"

@implementation LSZSignRecordManager
-(id)initWithSignRecord :(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSString class]]) {
            return self;
        }
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSNumber class]]) {
            return self;
        }
        if (![dic valueForKey:@"data"]) {
            return self;
        }
        NSMutableArray * AddArrayMg = [[NSMutableArray alloc]init];
        NSArray * dicArrayData = dic[@"data"];
        for (NSDictionary * dicMg in dicArrayData) {
            LSZSignRecordMg * mg = [[LSZSignRecordMg alloc]init];
            mg.avatar = NullStringjudgment(NSStr(dicMg[@"avatar"]));
            mg.content = NullStringjudgment(NSStr(dicMg[@"content"]));
            mg.uid = NullStringjudgment(NSStr(dicMg[@"uid"]));
            mg.id_id = NullStringjudgment(NSStr(dicMg[@"id"]));
            mg.is_open = NullStringjudgment(NSStr(dicMg[@"is_open"]));
            mg.uptime = NullStringjudgment(NSStr(dicMg[@"uptime"]));
            mg.username = NullStringjudgment(NSStr(dicMg[@"username"]));
            mg.click = NullStringjudgment(NSStr(dicMg[@"click"]));
            mg.is_fav = NullStringjudgment(NSStr(dicMg[@"is_fav"]));
            if([[dicMg allKeys] containsObject:@"credit"]){
                mg.credit = NullStringjudgment(NSStr(dicMg[@"credit"]));
            }
            [AddArrayMg addObject:mg];
        }
        self.arrayData = AddArrayMg;
    }
    return self;
}
@end
@implementation LSZSignRecordMg
@end
